#ifndef _HASH_TABLE_H
#define _HASH_TABLE_H

typedef struct ht_bucket {
	char 				key[500];
	char 				data[500];
	struct ht_bucket 	*next;
} ht_bucket;

typedef struct hashtable {
	int size;		/* table size */
	int n;			/* current number of entries */
	int nhash;		/* number of used table elements */
	ht_bucket **buckets;
} hashtable;

hashtable* ht_create(int size);
int ht_insert(hashtable *table, char *key, char *data);
void ht_destroy(hashtable *table);
char *ht_find(hashtable *table, char *key);

#endif
